public class Problem7 {

    public static void main(String[] args) {
	long countTwo = 0l;
	int counterThree = 0;
	long countersum = 0;
	for (int i = 1; i < 100000000; i++) {
	    int counter = 0;
	    if (i % 2 != 0 || i == 2) {
		for (int j = 1; j <= i; j++) {
		    if (i % j == 0) {
			counter++;
		    }
		}
	    }
	    if (counter == 2) {
		countTwo = i;
		counterThree++;
		if (countTwo > 10) {

		    break;
		}
		countersum = countersum + countTwo;
	    }
	    if (countTwo > 10) {

		break;
	    }
	}
	System.out.println(countersum);
    }
}
